<template>
	<view class="app-container">
		<view class="search-view">
			<u-icon name="arrow-left" @click="goBack" class="icon" size="50" color="#888"></u-icon>
			<view class="input-div">
				<u-input v-model="searchInput" placeholder-class="placeholder" placeholder="王楚钦" :border="false" />
				<!-- <u-search :clearabled="true" :label=""></u-search> -->
			</view>
			<u-button type="primary">搜索</u-button>
		</view>
		<view class="info-div">
			<text class="title">搜索结果</text>
			<u-button type="primary" shape="circle">
				<u-icon class="icon" name="play-right-fill"></u-icon>
				播放全部
			</u-button>
		</view>
		<view class="song-list">
			<view class="song-item" v-for="item in 10" :key="item">
				<view>
					<text class="num">{{item}}</text>
					<text class="name">我的纸飞机</text>
					<text class="singer">纸飞机</text>
				</view>
				<u-icon name="play-circle" color="#666"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchInput: ''
			}
		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.app-container {
		.input-div {
			border-bottom: 1px solid #ccc;
			width: 300px;
			margin-right: 15px;
			padding-left: 10px;
		}

		.search-view {
			display: flex;
			width: 400px;
			align-items: center;

			.icon {
				margin-right: 10px;
			}

			.u-btn {
				height: 35px;
				border-radius: 2px;
			}
		}

		.info-div {
			display: flex;
			align-items: center;
			margin: 15px 0;

			.title {
				line-height: 40px;
				display: inline-block;
				font-size: 15px;
				// font-weight: bold;
				color: #1dc493;
				margin-right: 20px;
			}

			.u-btn {
				height: 35px;
				line-height: 35px;

				.icon {
					margin-right: 4px;
				}
			}
		}

		.song-list {
			display: flex;
			align-items: center;
			flex-wrap: wrap;

			.song-item {
				width: 46%;
				margin-bottom: 14px;
				height: 42px;
				line-height: 42px;
				font-size: 15px;
				background-color: #f9f9f9;
				border-radius: 4px;
				margin-right: 4%;
				box-sizing: border-box;
				padding: 0 15px 0 10px;
				display: flex;
				align-items: center;
				cursor: pointer;

				.num {
					display: inline-block;
					width: 30px;
					text-align: center;
					margin-right: 10px;
					height: 30px;
					line-height: 30px;
					border-radius: 4px;
				}

				.singer {
					font-size: 12px;
					color: #999;
					margin: 0 20px;
				}
			}
		}
	}
</style>
